<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'polls-form',
	'enableAjaxValidation'=>false,
)); ?>
<?php 
	$objPoll = Polls::model()->getModel('LATEST-POLL',array());
	
	if(!empty($objPoll))
	{
	$arranswers = explode(",",$objPoll->poll_option);
	$objPoLLID=$objPoll->pollID;
	$objPoLLcount=$objPoll->count;
   
	?>
     <h1><?php print_r($objPoll->poll_question);?></h1>
     <?php echo CHtml::RadioButtonList('poll_option',$modelPollAnswer->poll_answer,$arranswers,array('separator'=>' ')); ?>
	 <input type="hidden" id="pollID_hidden" name="pollid" value="<?php echo $objPoLLID;?>">
	  <input type="hidden" id="pollcount_hidden" name="pollcount" value="<?php echo $objPoLLcount;?>">
	  <input type="hidden" id="pollq_hidden" name="pollq" value="<?php echo $objPoll->poll_question; ?>">
	 
	<div class="row buttons">
		<?php //echo CHtml::submitButton('Submit',array('submit'=>'pollAnswer')); ?>
		<?php echo CHtml::submitButton('Submit', array('submit'=>ApplicationConfig::getURL("", "Polldisplay", "pollAnswer"))); ?>

	</div>
<?php }
       else
	   { 
	    echo "sorry no polls found";
	   }
 $this->endWidget(); ?>

</div><!-- form -->